package com.blog.service.impl;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.plugins.Page;
import com.blog.service.BaseService;
import org.springframework.beans.factory.annotation.Autowired;

public class BaseServiceImpl<T extends Model<T>> implements BaseService<T> {

    @Autowired
    protected T model;

    @Override
    public Page<T> index(T param, Page<T> page) {
        return model.selectPage(page, "1=1");
    }

    @Override
    public T create(T model) {
//        if (model.)
        return null;
    }

    @Override
    public T update(T model) {
        return null;
    }

    @Override
    public boolean delete(int id) {
        return false;
    }

    @Override
    public T view(int id) {

        return null;
    }
}
